import request from '@/utils/request'

// 查询体检时段列表
export function listInterval(query) {
	return request({
		url: '/physical/interval/list',
		method: 'get',
		params: query
	})
}

// 查询体检时段详细
export function getInterval(intervalId) {
	return request({
		url: '/physical/interval/' + intervalId,
		method: 'get'
	})
}

// 新增体检时段
export function addInterval(data) {
	return request({
		url: '/physical/interval',
		method: 'post',
		data: data
	})
}

// 修改体检时段
export function updateInterval(data) {
	return request({
		url: '/physical/interval',
		method: 'put',
		data: data
	})
}

// 删除体检时段
export function delInterval(intervalId) {
	return request({
		url: '/physical/interval/' + intervalId,
		method: 'delete'
	})
}

// 导出体检时段
export function exportInterval(query) {
	return request({
		url: '/physical/interval/export',
		method: 'get',
		params: query
	})
}

export function getSchedule() {
	return request({
		url: '/physical/interval/getSchedule',
		method: 'get'
	})
}
